const jweutil = require('./jweutil')

// 模拟json数据
const jsonData = {
    username: 'ainge',
    password: 'password',
    other: {
        appid: 'app001',
        secret: 'secret'
    }
}
// json web encrypted
const jweData = jweutil.jsonEncrypt(JSON.stringify(jsonData))
console.log(jweData)


// json decrypted
const res = jweutil.jsonDecrypt(jweData)
console.log("json data: " + res)